﻿<UserControl x:Class="Big3.Hitbase.MainControls.PersonGroupViewTable"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:hc="clr-namespace:Big3.Hitbase.Controls;assembly=Controls"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Big3.Hitbase.MainControls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="700">
    <DataGrid CanUserAddRows="False" CanUserResizeRows="False" BorderThickness="0" HeadersVisibility="Column" SelectionUnit="FullRow" HorizontalGridLinesBrush="WhiteSmoke" VerticalGridLinesBrush="WhiteSmoke" EnableRowVirtualization="True" RowHeaderWidth="0" AutoGenerateColumns="False" AlternationCount="2" Name="dataGrid" Background="Transparent">
        <DataGrid.Columns>
            <DataGridTextColumn Header="Name" Binding="{Binding Name}" Width="200" />
            <DataGridTextColumn Header="Anzahl" Binding="{Binding NumberOfTracks}" Width="50" />
            <DataGridTextColumn Header="Art" Binding="{Binding PersonGroupType}" Width="100" />
            <DataGridTextColumn Header="Geschlecht" Binding="{Binding Sex}" Width="100" />
            <DataGridTextColumn Header="Herkunftsland" Binding="{Binding LandOfOrigin}" Width="100" />
            <DataGridTextColumn Header="Geboren / Gegründet" Binding="{Binding DayOfBirth}" Width="70" />
            <DataGridTextColumn Header="Gestorben / Aufgelöst" Binding="{Binding DayOfDeath}" Width="70" />
        </DataGrid.Columns>
        <DataGrid.RowStyle>
            <Style TargetType="{x:Type DataGridRow}">
                <Style.Triggers>
                    <Trigger Property="AlternationIndex" Value="0">
                        <Setter Property="Background" Value="#60FFFFFF" />
                    </Trigger>
                    <Trigger Property="AlternationIndex" Value="1">
                        <Setter Property="Background" Value="#20FFFFFF" />
                    </Trigger>
                    <Trigger Property="IsMouseOver" Value="True">
                        <Setter Property="Background" Value="#E9E9FF" />
                    </Trigger>
                    <Trigger Property="IsSelected" Value="True">
                        <Setter Property="Background" Value="#63A7D3FF" />
                    </Trigger>
                </Style.Triggers>
            </Style>
        </DataGrid.RowStyle>
        <DataGrid.CellStyle>
            <Style TargetType="{x:Type DataGridCell}">
                <Setter Property="Foreground" Value="{Binding Path=TextColor}" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type DataGridCell}">
                            <Border Background="Transparent" 
                  BorderBrush="{TemplateBinding BorderBrush}"  
                  BorderThickness="0" 
                  SnapsToDevicePixels="True" Padding="0 2 0 2" VerticalAlignment="Center">
                                <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Style.Triggers>
                    <Trigger Property="IsSelected" Value="True">
                        <Setter Property="Background" Value="#33A7D3FF" />
                    </Trigger>
                </Style.Triggers>
            </Style>
        </DataGrid.CellStyle>
    </DataGrid>
</UserControl>
